// CodeGear C++Builder
// Copyright (c) 1995, 2015 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'libavformat.pas' rev: 30.00 (Windows)

#ifndef LibavformatHPP
#define LibavformatHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <ffmpeg_types.hpp>
#include <libavutil.hpp>
#include <libavcodec.hpp>

//-- user supplied -----------------------------------------------------------

namespace Libavformat
{
//-- forward type declarations -----------------------------------------------
struct AVFilterFormats;
struct AVFilterChannelLayouts;
struct AVIOInterruptCB;
struct AVIODirEntry;
struct DECLSPEC_DRECORD URLContext
{
};


struct AVIODirContext;
struct AVIOContext;
struct AVChapter;
struct DECLSPEC_DRECORD AVFormatInternal
{
};


struct AVInputFormat;
struct AVFormatContext;
struct DECLSPEC_DRECORD AVCodecTag
{
};


struct AVProbeData;
struct DECLSPEC_DRECORD AVDeviceInfoList
{
};


struct DECLSPEC_DRECORD AVDeviceCapabilitiesQuery
{
};


struct AVOutputFormat;
struct AVIndexEntry;
struct DECLSPEC_DRECORD AVStreamInternal
{
};


struct AVStream_info;
struct AVPacketList;
struct AVStream;
struct AVProgram;
//-- type declarations -------------------------------------------------------
typedef AVFilterFormats *pAVFilterFormats;

typedef pAVFilterFormats *ppAVFilterFormats;

typedef ppAVFilterFormats *pppAVFilterFormats;

struct DECLSPEC_DRECORD AVFilterFormats
{
public:
	unsigned nb_formats;
	int *formats;
	unsigned refcount;
	ppAVFilterFormats *refs;
};


typedef AVFilterChannelLayouts *pAVFilterChannelLayouts;

typedef pAVFilterChannelLayouts *ppAVFilterChannelLayouts;

typedef ppAVFilterChannelLayouts *pppAVFilterChannelLayouts;

struct DECLSPEC_DRECORD AVFilterChannelLayouts
{
public:
	unsigned __int64 *channel_layouts;
	int nb_channel_layouts;
	char all_layouts;
	char all_counts;
	unsigned refcount;
	ppAVFilterChannelLayouts *refs;
};


typedef AVIOInterruptCB *pAVIOInterruptCB;

struct DECLSPEC_DRECORD AVIOInterruptCB
{
public:
	int __cdecl (*callback)(void * p);
	void *opaque;
};


enum DECLSPEC_DENUM AVIODirEntryType : unsigned int { AVIO_ENTRY_UNKNOWN, AVIO_ENTRY_BLOCK_DEVICE, AVIO_ENTRY_CHARACTER_DEVICE, AVIO_ENTRY_DIRECTORY, AVIO_ENTRY_NAMED_PIPE, AVIO_ENTRY_SYMBOLIC_LINK, AVIO_ENTRY_SOCKET, AVIO_ENTRY_FILE, AVIO_ENTRY_SERVER, AVIO_ENTRY_SHARE, AVIO_ENTRY_WORKGROUP };

typedef AVIODirEntry *pAVIODirEntry;

struct DECLSPEC_DRECORD AVIODirEntry
{
public:
	char *name;
	int _type;
	int utf8;
	__int64 size;
	__int64 modification_timestamp;
	__int64 access_timestamp;
	__int64 status_change_timestamp;
	__int64 user_id;
	__int64 group_id;
	__int64 filemode;
};


typedef URLContext *pURLContext;

typedef AVIODirContext *pAVIODirContext;

struct DECLSPEC_DRECORD AVIODirContext
{
public:
	URLContext *url_context;
};


enum DECLSPEC_DENUM AVIODataMarkerType : unsigned int { AVIO_DATA_MARKER_HEADER, AVIO_DATA_MARKER_SYNC_POINT, AVIO_DATA_MARKER_BOUNDARY_POINT, AVIO_DATA_MARKER_UNKNOWN, AVIO_DATA_MARKER_TRAILER, AVIO_DATA_MARKER_FLUSH_POINT };

typedef AVIOContext *pAVIOContext;

struct DECLSPEC_DRECORD AVIOContext
{
public:
	Libavutil::avclass *av_class;
	System::Byte *buffer;
	int buffer_size;
	System::Byte *buf_ptr;
	System::Byte *buf_end;
	void *opaque;
	int __cdecl (*read_packet)(void * opaque, System::PByte buf, int buf_size);
	int __cdecl (*write_packet)(void * opaque, System::PByte buf, int buf_size);
	__int64 __cdecl (*seek)(void * opaque, __int64 offset, int whence);
	__int64 pos;
	int eof_reached;
	int write_flag;
	int max_packet_size;
	unsigned checksum;
	System::Byte *checksum_ptr;
	unsigned __cdecl (*update_checksum)(unsigned checksum, const System::PByte buf, unsigned size);
	int error;
	int __cdecl (*read_pause)(void * opaque, int pause);
	__int64 __cdecl (*read_seek)(void * opaque, int stream_index, __int64 timestamp, int flags);
	int seekable;
	__int64 maxsize;
	int direct;
	__int64 bytes_read;
	int seek_count;
	int writeout_count;
	int orig_buffer_size;
	int short_seek_threshold;
	char *protocol_whitelist;
	char *protocol_blacklist;
	int __cdecl (*write_data_type)(void * opaque, System::PByte buf, int buf_size, AVIODataMarkerType _type, __int64 time);
	int ignore_boundary_point;
	AVIODataMarkerType current_type;
	__int64 last_time;
	int __cdecl (*short_seek_get)(void * opaque);
	__int64 written;
	System::Byte *buf_ptr_max;
	int min_packet_size;
};


typedef int __cdecl (*Tavio_alloc_context_read_packet)(void * opaque, System::PByte buf, int buf_size);

typedef Tavio_alloc_context_read_packet Tavio_alloc_context_write_packet;

typedef __int64 __cdecl (*Tavio_alloc_context_seek)(void * opaque, __int64 offset, int whence);

typedef AVFormatContext *pAVFormatContext;

typedef pAVFormatContext *ppAVFormatContext;

typedef AVFormatInternal *pAVFormatInternal;

typedef AVInputFormat *pAVInputFormat;

typedef AVCodecTag *pAVCodecTag;

typedef pAVCodecTag *ppAVCodecTag;

typedef AVProbeData *pAVProbeData;

typedef AVDeviceInfoList *pAVDeviceInfoList;

typedef AVDeviceCapabilitiesQuery *pAVDeviceCapabilitiesQuery;

typedef AVOutputFormat *pAVOutputFormat;

typedef AVChapter *pAVChapter;

typedef pAVChapter *ppAVChapter;

typedef AVStream *pAVStream;

typedef pAVStream *ppAVStream;

typedef AVProgram *pAVProgram;

typedef pAVProgram *ppAVProgram;

struct DECLSPEC_DRECORD AVChapter
{
public:
	int id;
	Libavutil::AVRational time_base;
	__int64 start;
	__int64 _end;
	Libavutil::AVDictionary *metadata;
};


typedef int __cdecl (*Tav_format_control_message)(pAVFormatContext s, int _type, void * data, NativeUInt data_size);

typedef int __cdecl (*TAVOpenCallback)(pAVFormatContext s, pAVIOContext &pb, const char * url, int flags, const pAVIOInterruptCB int_cb, Libavutil::pAVDictionary &options);

enum DECLSPEC_DENUM AVDurationEstimationMethod : unsigned int { AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, AVFMT_DURATION_FROM_BITRATE };

struct DECLSPEC_DRECORD AVInputFormat
{
public:
	char *name;
	char *long_name;
	int flags;
	char *extensions;
	pAVCodecTag *codec_tag;
	Libavutil::avclass *priv_class;
	char *mime_type;
	AVInputFormat *next;
	int raw_codec_id;
	int priv_data_size;
	int __cdecl (*read_probe)(const pAVProbeData p);
	int __cdecl (*read_header)(pAVFormatContext p);
	int __cdecl (*read_packet)(pAVFormatContext p, Libavcodec::pAVPacket pkt);
	int __cdecl (*read_close)(pAVFormatContext p);
	int __cdecl (*read_seek)(pAVFormatContext p, int stream_index, __int64 timestamp, int flags);
	__int64 __cdecl (*read_timestamp)(pAVFormatContext s, int stream_index, __int64 &pos, __int64 pos_limit);
	int __cdecl (*read_play)(pAVFormatContext p);
	int __cdecl (*read_pause)(pAVFormatContext p);
	int __cdecl (*read_seek2)(pAVFormatContext s, int stream_index, __int64 min_ts, __int64 ts, __int64 max_ts, int flags);
	int __cdecl (*get_device_list)(pAVFormatContext s, pAVDeviceInfoList device_list);
	int __cdecl (*create_device_capabilities)(pAVFormatContext s, pAVDeviceCapabilitiesQuery caps);
	int __cdecl (*free_device_capabilities)(pAVFormatContext s, pAVDeviceCapabilitiesQuery caps);
};


struct DECLSPEC_DRECORD AVFormatContext
{
public:
	Libavutil::avclass *av_class;
	AVInputFormat *iformat;
	AVOutputFormat *oformat;
	void *priv_data;
	AVIOContext *pb;
	int ctx_flags;
	unsigned nb_streams;
	pAVStream *streams;
	System::StaticArray<char, 1024> filename;
	char *url;
	__int64 start_time;
	__int64 duration;
	__int64 bit_rate;
	unsigned packet_size;
	int max_delay;
	int flags;
	__int64 robesize;
	__int64 ax_analyze_duration;
	System::Byte *key;
	int keylen;
	unsigned nb_programs;
	pAVProgram *programs;
	Libavcodec::AVCodecID video_codec_id;
	Libavcodec::AVCodecID audio_codec_id;
	Libavcodec::AVCodecID subtitle_codec_id;
	unsigned max_index_size;
	unsigned max_picture_buffer;
	unsigned nb_chapters;
	pAVChapter *chapters;
	Libavutil::AVDictionary *metadata;
	__int64 start_time_realtime;
	int fps_probe_size;
	int error_recognition;
	AVIOInterruptCB interrupt_callback;
	int debug;
	__int64 max_interleave_delta;
	int strict_std_compliance;
	int event_flags;
	int max_ts_probe;
	int avoid_negative_ts;
	int ts_id;
	int audio_preload;
	int max_chunk_duration;
	int max_chunk_size;
	int use_wallclock_as_timestamps;
	int avio_flags;
	AVDurationEstimationMethod duration_estimation_method;
	__int64 skip_initial_bytes;
	unsigned correct_ts_overflow;
	int seek2any;
	int flush_packets;
	int probe_score;
	int format_probesize;
	char *codec_whitelist;
	char *format_whitelist;
	AVFormatInternal *internal;
	int io_repositioned;
	Libavcodec::avcodec *video_codec;
	Libavcodec::avcodec *audio_codec;
	Libavcodec::avcodec *subtitle_codec;
	Libavcodec::avcodec *data_codec;
	int metadata_header_padding;
	void *opaque;
	Tav_format_control_message control_message_cb;
	__int64 output_ts_offset;
	System::Byte *dump_separator;
	Libavcodec::AVCodecID data_codec_id;
	int __cdecl (*open_cb)(pAVFormatContext s, pAVIOContext &p, const char * url, int flags, const pAVIOInterruptCB int_cb, Libavutil::pAVDictionary &options);
	char *protocol_whitelist;
	int __cdecl (*io_open)(pAVFormatContext s, pAVIOContext &pb, const char * url, int flags, Libavutil::pAVDictionary &options);
	void __cdecl (*io_close)(pAVFormatContext s, pAVIOContext pb);
	char *protocol_blacklist;
	int max_streams;
	int skip_estimate_duration_from_pts;
};


struct DECLSPEC_DRECORD AVProbeData
{
public:
	char *filename;
	System::Byte *buf;
	int buf_size;
	char *mime_type;
};


struct DECLSPEC_DRECORD AVOutputFormat
{
public:
	char *name;
	char *long_name;
	char *mime_type;
	char *extensions;
	Libavcodec::AVCodecID audio_codec;
	Libavcodec::AVCodecID video_codec;
	Libavcodec::AVCodecID subtitle_codec;
	int flags;
	pAVCodecTag *codec_tag;
	Libavutil::avclass *priv_class;
	AVOutputFormat *next;
	int priv_data_size;
	int __cdecl (*write_header)(pAVFormatContext p);
	int __cdecl (*write_packet)(pAVFormatContext fc, Libavcodec::pAVPacket pkt);
	int __cdecl (*write_trailer)(pAVFormatContext p);
	int __cdecl (*interleave_packet)(pAVFormatContext p, Libavcodec::pAVPacket _out, Libavcodec::pAVPacket _in, int flush);
	int __cdecl (*query_codec)(Libavcodec::AVCodecID id, int std_compliance);
	void __cdecl (*get_output_timestamp)(pAVFormatContext s, int stream, __int64 &dts, __int64 &wall);
	int __cdecl (*control_message)(pAVFormatContext s, int _type, void * data, NativeUInt data_size);
	int __cdecl (*write_uncoded_frame)(pAVFormatContext p, int stream_index, Libavutil::pAVFrame &frame, unsigned flags);
	int __cdecl (*get_device_list)(pAVFormatContext s, pAVDeviceInfoList device_list);
	int __cdecl (*create_device_capabilities)(pAVFormatContext s, pAVDeviceCapabilitiesQuery caps);
	int __cdecl (*free_device_capabilities)(pAVFormatContext s, pAVDeviceCapabilitiesQuery caps);
	Libavcodec::AVCodecID data_codec;
	int __cdecl (*init)(pAVFormatContext p);
	void __cdecl (*deinit)(pAVFormatContext p);
	int __cdecl (*check_bitstream)(pAVFormatContext p, const Libavcodec::pAVPacket pkt);
};


enum DECLSPEC_DENUM AVStreamParseType : unsigned int { AVSTREAM_PARSE_NONE, AVSTREAM_PARSE_FULL, AVSTREAM_PARSE_HEADERS, AVSTREAM_PARSE_TIMESTAMPS, AVSTREAM_PARSE_FULL_ONCE, AVSTREAM_PARSE_FULL_RAW };

typedef AVIndexEntry *pAVIndexEntry;

struct DECLSPEC_DRECORD AVIndexEntry
{
public:
	__int64 pos;
	__int64 timestamp;
	int flag_size;
	int min_distance;
};


typedef AVStreamInternal *pAVStreamInternal;

typedef System::StaticArray<System::StaticArray<double, 400>, 2> Tduration_error;

typedef Tduration_error *pduration_error;

typedef AVStream_info *pAVStream_info;

struct DECLSPEC_DRECORD AVStream_info
{
public:
	__int64 last_dts;
	__int64 duration_gcd;
	int duration_count;
	__int64 rfps_duration_sum;
	Tduration_error *duration_error;
	__int64 codec_info_duration;
	__int64 codec_info_duration_fields;
	int frame_delay_evidence;
	int found_decoder;
	__int64 last_duration;
	__int64 fps_first_dts;
	int fps_first_dts_idx;
	__int64 fps_last_dts;
	int fps_last_dts_idx;
};


typedef System::StaticArray<__int64, 17> Tpts_buffer_int64_t;

typedef System::StaticArray<System::Byte, 17> Tpts_reorder_error_count_uint8_t;

typedef AVPacketList *pAVPacketList;

struct DECLSPEC_DRECORD AVPacketList
{
public:
	Libavcodec::AVPacket pkt;
	AVPacketList *next;
};


struct DECLSPEC_DRECORD AVStream
{
public:
	int index;
	int id;
	Libavcodec::AVCodecContext *codec;
	void *priv_data;
	Libavutil::AVRational time_base;
	__int64 start_time;
	__int64 duration;
	__int64 nb_frames;
	int disposition;
	Libavcodec::AVDiscard discard;
	Libavutil::AVRational sample_aspect_ratio;
	Libavutil::AVDictionary *metadata;
	Libavutil::AVRational avg_frame_rate;
	Libavcodec::AVPacket attached_pic;
	Libavcodec::AVPacketSideData *side_data;
	int nb_side_data;
	int event_flags;
	Libavutil::AVRational r_frame_rate;
	char *recommended_encoder_configuration;
	Libavcodec::AVCodecParameters *codecpar;
	AVStream_info *info;
	int pts_wrap_bits;
	__int64 first_dts;
	__int64 cur_dts;
	__int64 last_IP_pts;
	int last_IP_duration;
	int probe_packets;
	int codec_info_nb_frames;
	AVStreamParseType need_parsing;
	Libavcodec::AVCodecParserContext *parser;
	AVPacketList *last_in_packet_buffer;
	AVProbeData probe_data;
	Tpts_buffer_int64_t pts_buffer;
	AVIndexEntry *index_entries;
	int nb_index_entries;
	unsigned index_entries_allocated_size;
	int stream_identifier;
	int program_num;
	int pmt_version;
	int pmt_stream_idx;
	__int64 interleaver_chunk_size;
	__int64 interleaver_chunk_duration;
	int request_probe;
	int skip_to_keyframe;
	int skip_samples;
	__int64 start_skip_samples;
	__int64 first_discard_sample;
	__int64 last_discard_sample;
	int nb_decoded_frames;
	__int64 mux_ts_offset;
	__int64 pts_wrap_reference;
	int pts_wrap_behavior;
	int update_initial_durations_done;
	Tpts_buffer_int64_t pts_reorder_error;
	Tpts_reorder_error_count_uint8_t pts_reorder_error_count;
	__int64 last_dts_for_order_check;
	System::Byte dts_ordered;
	System::Byte dts_misordered;
	int inject_global_side_data;
	Libavutil::AVRational display_aspect_ratio;
	AVStreamInternal *internal;
};


struct DECLSPEC_DRECORD AVProgram
{
public:
	int id;
	int flags;
	Libavcodec::AVDiscard discard;
	unsigned *stream_index;
	unsigned nb_stream_indexes;
	Libavutil::AVDictionary *metadata;
	int program_num;
	int pmt_pid;
	int pcr_pid;
	int pmt_version;
	__int64 start_time;
	__int64 end_time;
	__int64 pts_wrap_reference;
	int pts_wrap_behavior;
};


enum DECLSPEC_DENUM AVTimebaseSource: int { AVFMT_TBCF_AUTO = -1, AVFMT_TBCF_DECODER, AVFMT_TBCF_DEMUXER };

//-- var, const, procedure ---------------------------------------------------
static const System::Int8 LIBAVUTIL_VERSION_MAJOR = System::Int8(0x38);
#define LIBAVUTIL_VERSION_MAJOR_STR L"56"
static const System::Int8 LIBAVUTIL_VERSION_MINOR = System::Int8(0x1f);
static const System::Int8 LIBAVUTIL_VERSION_MICRO = System::Int8(0x64);
#define FFMPEG_VERSION L"4.2.2"
static const int LIBAVUTIL_VERSION_INT = int(0x381f64);
static const System::Int8 LIBSWSCALE_VERSION_MAJOR = System::Int8(0x5);
static const System::WideChar LIBSWSCALE_VERSION_MAJOR_STR = (System::WideChar)(0x35);
static const System::Int8 LIBSWSCALE_VERSION_MINOR = System::Int8(0x5);
static const System::Int8 LIBSWSCALE_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBAVCODEC_VERSION_MAJOR = System::Int8(0x3a);
#define LIBAVCODEC_VERSION_MAJOR_STR L"58"
static const System::Int8 LIBAVCODEC_VERSION_MINOR = System::Int8(0x36);
static const System::Int8 LIBAVCODEC_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBAVDEVICE_VERSION_MAJOR = System::Int8(0x3a);
#define LIBAVDEVICE_VERSION_MAJOR_STR L"58"
static const System::Int8 LIBAVDEVICE_VERSION_MINOR = System::Int8(0x8);
static const System::Int8 LIBAVDEVICE_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBAVFORMAT_VERSION_MAJOR = System::Int8(0x3a);
#define LIBAVFORMAT_VERSION_MAJOR_STR L"58"
static const System::Int8 LIBAVFORMAT_VERSION_MINOR = System::Int8(0x1d);
static const System::Int8 LIBAVFORMAT_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 FF_API_R_FRAME_RATE = System::Int8(0x1);
static const System::Int8 LIBPOSTPROC_VERSION_MAJOR = System::Int8(0x37);
#define LIBPOSTPROC_VERSION_MAJOR_STR L"55"
static const System::Int8 LIBPOSTPROC_VERSION_MINOR = System::Int8(0x5);
static const System::Int8 LIBPOSTPROC_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBSWRESAMPLE_VERSION_MAJOR = System::Int8(0x3);
static const System::WideChar LIBSWRESAMPLE_VERSION_MAJOR_STR = (System::WideChar)(0x33);
static const System::Int8 LIBSWRESAMPLE_VERSION_MINOR = System::Int8(0x5);
static const System::Int8 LIBSWRESAMPLE_VERSION_MICRO = System::Int8(0x64);
static const System::Int8 LIBAVFILTER_VERSION_MAJOR = System::Int8(0x7);
static const System::WideChar LIBAVFILTER_VERSION_MAJOR_STR = (System::WideChar)(0x37);
static const System::Int8 LIBAVFILTER_VERSION_MINOR = System::Int8(0x39);
static const System::Int8 LIBAVFILTER_VERSION_MICRO = System::Int8(0x64);
#define swscale_dll L"swscale-5.dll"
#define avutil_dll L"avutil-56.dll"
#define avcodec_dll L"avcodec-58.dll"
#define avdevice_dll L"avdevice-58.dll"
#define avformat_dll L"avformat-58.dll"
#define postproc_dll L"postproc-55.dll"
#define swresample_dll L"swresample-3.dll"
#define avfilter_dll L"avfilter-7.dll"
static const System::Int8 AVIO_SEEKABLE_NORMAL = System::Int8(0x1);
static const System::Int8 AVIO_SEEKABLE_TIME = System::Int8(0x2);
extern "C" char * __cdecl avio_find_protocol_name(const char * url);
extern "C" int __cdecl avio_check(const char * url, int flags);
extern "C" int __cdecl avpriv_io_move(const char * url_src, const char * url_dst);
extern "C" int __cdecl avpriv_io_delete(const char * url);
extern "C" int __cdecl avio_open_dir(pAVIODirContext &s, const char * url, Libavutil::ppAVDictionary options);
extern "C" int __cdecl avio_read_dir(pAVIODirContext s, pAVIODirEntry &next);
extern "C" int __cdecl avio_close_dir(pAVIODirContext &s);
extern "C" void __cdecl avio_free_directory_entry(pAVIODirEntry &entry);
extern "C" pAVIOContext __cdecl avio_alloc_context(System::PByte buffer, int buffer_size, int write_flag, void * opaque, Tavio_alloc_context_read_packet read_packet, Tavio_alloc_context_read_packet write_packet, Tavio_alloc_context_seek seek);
extern "C" void __cdecl avio_context_free(pAVIOContext &s);
extern "C" void __cdecl avio_w8(pAVIOContext s, int b);
extern "C" void __cdecl avio_write(pAVIOContext s, const System::PByte buf, int size);
extern "C" void __cdecl avio_wl64(pAVIOContext s, unsigned __int64 val);
extern "C" void __cdecl avio_wb64(pAVIOContext s, unsigned __int64 val);
extern "C" void __cdecl avio_wl32(pAVIOContext s, unsigned val);
extern "C" void __cdecl avio_wb32(pAVIOContext s, unsigned val);
extern "C" void __cdecl avio_wl24(pAVIOContext s, unsigned val);
extern "C" void __cdecl avio_wb24(pAVIOContext s, unsigned val);
extern "C" void __cdecl avio_wl16(pAVIOContext s, unsigned val);
extern "C" void __cdecl avio_wb16(pAVIOContext s, unsigned val);
extern "C" int __cdecl avio_put_str(pAVIOContext s, const char * str);
extern "C" int __cdecl avio_put_str16le(pAVIOContext s, const char * str);
extern "C" int __cdecl avio_put_str16be(pAVIOContext s, const char * str);
extern "C" void __cdecl avio_write_marker(pAVIOContext s, __int64 time, AVIODataMarkerType _type);
static const int AVSEEK_SIZE = int(0x10000);
static const int AVSEEK_FORCE = int(0x20000);
extern "C" __int64 __cdecl avio_seek(pAVIOContext s, __int64 offset, int whence);
extern "C" __int64 __cdecl avio_skip(pAVIOContext s, __int64 offset);
extern "C" __int64 __cdecl avio_size(pAVIOContext s);
extern "C" int __cdecl avio_feof(pAVIOContext s);
extern "C" void __cdecl avio_flush(pAVIOContext s);
extern "C" int __cdecl avio_read(pAVIOContext s, System::PByte buf, int size);
extern "C" int __cdecl avio_read_partial(pAVIOContext s, System::PByte buf, int size);
extern "C" int __cdecl avio_r8(pAVIOContext s);
extern "C" unsigned __cdecl avio_rl16(pAVIOContext s);
extern "C" unsigned __cdecl avio_rl24(pAVIOContext s);
extern "C" unsigned __cdecl avio_rl32(pAVIOContext s);
extern "C" unsigned __int64 __cdecl avio_rl64(pAVIOContext s);
extern "C" unsigned __cdecl avio_rb16(pAVIOContext s);
extern "C" unsigned __cdecl avio_rb24(pAVIOContext s);
extern "C" unsigned __cdecl avio_rb32(pAVIOContext s);
extern "C" unsigned __int64 __cdecl avio_rb64(pAVIOContext s);
extern "C" int __cdecl avio_get_str(pAVIOContext pb, int maxlen, char * buf, int buflen);
extern "C" int __cdecl avio_get_str16le(pAVIOContext pb, int maxlen, char * buf, int buflen);
extern "C" int __cdecl avio_get_str16be(pAVIOContext pb, int maxlen, char * buf, int buflen);
static const System::Int8 AVIO_FLAG_READ = System::Int8(0x1);
static const System::Int8 AVIO_FLAG_WRITE = System::Int8(0x2);
static const System::Int8 AVIO_FLAG_READ_WRITE = System::Int8(0x3);
static const System::Int8 AVIO_FLAG_NONBLOCK = System::Int8(0x8);
static const System::Word AVIO_FLAG_DIRECT = System::Word(0x8000);
extern "C" int __cdecl avio_open(pAVIOContext &s, const char * url, int flags);
extern "C" int __cdecl avio_open2(pAVIOContext &s, const char * url, int flags, const pAVIOInterruptCB int_cb, Libavutil::pAVDictionary &options);
extern "C" int __cdecl avio_close(pAVIOContext s);
extern "C" int __cdecl avio_closep(pAVIOContext &s);
extern "C" int __cdecl avio_open_dyn_buf(pAVIOContext &s);
extern "C" int __cdecl avio_get_dyn_buf(pAVIOContext s, System::PByte &pbuffer);
extern "C" int __cdecl avio_close_dyn_buf(pAVIOContext s, System::PByte &pbuffer);
extern "C" char * __cdecl avio_enum_protocols(void * &opaque, int output);
extern "C" int __cdecl avio_pause(pAVIOContext h, int pause);
extern "C" __int64 __cdecl avio_seek_time(pAVIOContext h, int stream_index, __int64 timestamp, int flags);
extern "C" int __cdecl avio_read_to_bprint(pAVIOContext h, Libavutil::pAVBPrint pb, NativeUInt max_size);
extern "C" int __cdecl avio_accept(pAVIOContext s, pAVIOContext &c);
extern "C" int __cdecl avio_handshake(pAVIOContext c);
static const System::Int8 AVFMT_FLAG_GENPTS = System::Int8(0x1);
static const System::Int8 AVFMT_FLAG_IGNIDX = System::Int8(0x2);
static const System::Int8 AVFMT_FLAG_NONBLOCK = System::Int8(0x4);
static const System::Int8 AVFMT_FLAG_IGNDTS = System::Int8(0x8);
static const System::Int8 AVFMT_FLAG_NOFILLIN = System::Int8(0x10);
static const System::Int8 AVFMT_FLAG_NOPARSE = System::Int8(0x20);
static const System::Int8 AVFMT_FLAG_NOBUFFER = System::Int8(0x40);
static const System::Byte AVFMT_FLAG_CUSTOM_IO = System::Byte(0x80);
static const System::Word AVFMT_FLAG_DISCARD_CORRUPT = System::Word(0x100);
static const System::Word AVFMT_FLAG_FLUSH_PACKETS = System::Word(0x200);
static const System::Word AVFMT_FLAG_BITEXACT = System::Word(0x400);
static const System::Word AVFMT_FLAG_MP4A_LATM = System::Word(0x8000);
static const int AVFMT_FLAG_SORT_DTS = int(0x10000);
static const int AVFMT_FLAG_PRIV_OPT = int(0x20000);
static const int AVFMT_FLAG_KEEP_SIDE_DATA = int(0x40000);
static const int AVFMT_FLAG_FAST_SEEK = int(0x80000);
static const int AVFMT_FLAG_SHORTEST = int(0x100000);
static const int AVFMT_FLAG_AUTO_BSF = int(0x200000);
static const System::Int8 FF_FDEBUG_TS = System::Int8(0x1);
static const System::Int8 AVFMT_EVENT_FLAG_METADATA_UPDATED = System::Int8(0x1);
static const System::Int8 AVFMT_AVOID_NEG_TS_AUTO = System::Int8(-1);
static const System::Int8 AVFMT_AVOID_NEG_TS_MAKE_NON_NEGATIVE = System::Int8(0x1);
static const System::Int8 AVFMT_AVOID_NEG_TS_MAKE_ZERO = System::Int8(0x2);
static const System::Int8 AV_PROGRAM_RUNNING = System::Int8(0x1);
static const System::Int8 AVFMTCTX_NOHEADER = System::Int8(0x1);
static const System::Int8 AVFMTCTX_UNSEEKABLE = System::Int8(0x2);
static const System::Int8 AVPROBE_SCORE_EXTENSION = System::Int8(0x32);
static const System::Int8 AVPROBE_SCORE_MIME = System::Int8(0x4b);
static const System::Int8 AVPROBE_SCORE_MAX = System::Int8(0x64);
static const System::Int8 AVPROBE_PADDING_SIZE = System::Int8(0x20);
static const System::Int8 AVPROBE_SCORE_RETRY = System::Int8(0x19);
static const System::Int8 AVPROBE_SCORE_STREAM_RETRY = System::Int8(0x18);
static const System::Int8 AVFMT_NOFILE = System::Int8(0x1);
static const System::Int8 AVFMT_NEEDNUMBER = System::Int8(0x2);
static const System::Int8 AVFMT_SHOW_IDS = System::Int8(0x8);
static const System::Int8 AVFMT_GLOBALHEADER = System::Int8(0x40);
static const System::Byte AVFMT_NOTIMESTAMPS = System::Byte(0x80);
static const System::Word AVFMT_GENERIC_INDEX = System::Word(0x100);
static const System::Word AVFMT_TS_DISCONT = System::Word(0x200);
static const System::Word AVFMT_VARIABLE_FPS = System::Word(0x400);
static const System::Word AVFMT_NODIMENSIONS = System::Word(0x800);
static const System::Word AVFMT_NOSTREAMS = System::Word(0x1000);
static const System::Word AVFMT_NOBINSEARCH = System::Word(0x2000);
static const System::Word AVFMT_NOGENSEARCH = System::Word(0x4000);
static const System::Word AVFMT_NO_BYTE_SEEK = System::Word(0x8000);
static const int AVFMT_ALLOW_FLUSH = int(0x10000);
static const int AVFMT_TS_NONSTRICT = int(0x20000);
static const int AVFMT_TS_NEGATIVE = int(0x40000);
static const int AVFMT_SEEK_TO_PTS = int(0x4000000);
static const System::Int8 AVINDEX_KEYFRAME = System::Int8(0x1);
static const System::Int8 AVINDEX_DISCARD_FRAME = System::Int8(0x2);
static const System::Int8 AV_DISPOSITION_DEFAULT = System::Int8(0x1);
static const System::Int8 AV_DISPOSITION_DUB = System::Int8(0x2);
static const System::Int8 AV_DISPOSITION_ORIGINAL = System::Int8(0x4);
static const System::Int8 AV_DISPOSITION_COMMENT = System::Int8(0x8);
static const System::Int8 AV_DISPOSITION_LYRICS = System::Int8(0x10);
static const System::Int8 AV_DISPOSITION_KARAOKE = System::Int8(0x20);
static const System::Int8 AV_DISPOSITION_FORCED = System::Int8(0x40);
static const System::Byte AV_DISPOSITION_HEARING_IMPAIRED = System::Byte(0x80);
static const System::Word AV_DISPOSITION_VISUAL_IMPAIRED = System::Word(0x100);
static const System::Word AV_DISPOSITION_CLEAN_EFFECTS = System::Word(0x200);
static const System::Word AV_DISPOSITION_ATTACHED_PIC = System::Word(0x400);
static const System::Word AV_DISPOSITION_TIMED_THUMBNAILS = System::Word(0x800);
static const int AV_DISPOSITION_CAPTIONS = int(0x10000);
static const int AV_DISPOSITION_DESCRIPTIONS = int(0x20000);
static const int AV_DISPOSITION_METADATA = int(0x40000);
static const int AV_DISPOSITION_DEPENDENT = int(0x80000);
static const int AV_DISPOSITION_STILL_IMAGE = int(0x100000);
static const System::Int8 AV_PTS_WRAP_IGNORE = System::Int8(0x0);
static const System::Int8 AV_PTS_WRAP_ADD_OFFSET = System::Int8(0x1);
static const System::Int8 AV_PTS_WRAP_SUB_OFFSET = System::Int8(-1);
static const System::Int8 AVSTREAM_EVENT_FLAG_METADATA_UPDATED = System::Int8(0x1);
static const System::Word MAX_STD_TIMEBASES = System::Word(0x18f);
static const System::Int8 MAX_REORDER_DELAY = System::Int8(0x10);
extern "C" int __cdecl av_get_packet(pAVIOContext s, Libavcodec::pAVPacket pkt, int size);
extern "C" int __cdecl av_append_packet(pAVIOContext s, Libavcodec::pAVPacket pkt, int size);
extern "C" Libavutil::AVRational __cdecl av_stream_get_r_frame_rate(const pAVStream s);
extern "C" void __cdecl av_stream_set_r_frame_rate(pAVStream s, const Libavutil::AVRational r);
extern "C" char * __cdecl av_stream_get_recommended_encoder_configuration(const pAVStream s);
extern "C" void __cdecl av_stream_set_recommended_encoder_configuration(pAVStream s, char * configuration);
extern "C" Libavcodec::pAVCodecParserContext __cdecl av_stream_get_parser(const pAVStream s);
extern "C" __int64 __cdecl av_stream_get_end_pts(const pAVStream st);
extern "C" int __cdecl av_format_get_probe_score(const pAVFormatContext s);
extern "C" Libavcodec::pAVCodec __cdecl av_format_get_video_codec(const pAVFormatContext s);
extern "C" void __cdecl av_format_set_video_codec(pAVFormatContext s, Libavcodec::pAVCodec c);
extern "C" Libavcodec::pAVCodec __cdecl av_format_get_audio_codec(const pAVFormatContext s);
extern "C" void __cdecl av_format_set_audio_codec(pAVFormatContext s, Libavcodec::pAVCodec c);
extern "C" Libavcodec::pAVCodec __cdecl av_format_get_subtitle_codec(const pAVFormatContext s);
extern "C" void __cdecl av_format_set_subtitle_codec(pAVFormatContext s, Libavcodec::pAVCodec c);
extern "C" Libavcodec::pAVCodec __cdecl av_format_get_data_codec(const pAVFormatContext s);
extern "C" void __cdecl av_format_set_data_codec(pAVFormatContext s, Libavcodec::pAVCodec c);
extern "C" int __cdecl av_format_get_metadata_header_padding(const pAVFormatContext s);
extern "C" void __cdecl av_format_set_metadata_header_padding(pAVFormatContext s, int c);
extern "C" void * __cdecl av_format_get_opaque(const pAVFormatContext s);
extern "C" void __cdecl av_format_set_opaque(pAVFormatContext s, void * opaque);
extern "C" Tav_format_control_message __cdecl av_format_get_control_message_cb(const pAVFormatContext s);
extern "C" void __cdecl av_format_set_control_message_cb(pAVFormatContext s, Tav_format_control_message callback);
extern "C" TAVOpenCallback __cdecl av_format_get_open_cb(const pAVFormatContext s);
extern "C" void __cdecl av_format_set_open_cb(pAVFormatContext s, TAVOpenCallback callback);
extern "C" void __cdecl av_format_inject_global_side_data(pAVFormatContext s);
extern "C" AVDurationEstimationMethod __cdecl av_fmt_ctx_get_duration_estimation_method(const pAVFormatContext ctx);
extern "C" unsigned __cdecl avformat_version(void);
extern "C" char * __cdecl avformat_configuration(void);
extern "C" char * __cdecl avformat_license(void);
extern "C" void __cdecl av_register_all(void);
extern "C" void __cdecl av_register_input_format(pAVInputFormat format);
extern "C" void __cdecl av_register_output_format(pAVOutputFormat format);
extern "C" int __cdecl avformat_network_init(void);
extern "C" int __cdecl avformat_network_deinit(void);
extern "C" pAVInputFormat __cdecl av_iformat_next(const pAVInputFormat f);
extern "C" pAVOutputFormat __cdecl av_oformat_next(const pAVOutputFormat f);
extern "C" pAVOutputFormat __cdecl av_muxer_iterate(void * &opaque);
extern "C" pAVInputFormat __cdecl av_demuxer_iterate(void * &opaque);
extern "C" pAVFormatContext __cdecl avformat_alloc_context(void);
extern "C" void __cdecl avformat_free_context(pAVFormatContext s);
extern "C" Libavutil::pAVClass __cdecl avformat_get_class(void);
extern "C" pAVStream __cdecl avformat_new_stream(pAVFormatContext s, const Libavcodec::pAVCodec c);
extern "C" int __cdecl av_stream_add_side_data(pAVStream st, Libavcodec::AVPacketSideDataType _type, System::PByte data, NativeUInt size);
extern "C" System::PByte __cdecl av_stream_new_side_data(pAVStream stream, Libavcodec::AVPacketSideDataType _type, int size);
extern "C" System::PByte __cdecl av_stream_get_side_data(const pAVStream stream, Libavcodec::AVPacketSideDataType _type, int &size);
extern "C" pAVProgram __cdecl av_new_program(pAVFormatContext s, int id);
extern "C" int __cdecl avformat_alloc_output_context2(pAVFormatContext &ctx, pAVOutputFormat oformat, const char * format_name, const char * filename);
extern "C" pAVInputFormat __cdecl av_find_input_format(const char * short_name);
extern "C" pAVInputFormat __cdecl av_probe_input_format(pAVProbeData pd, int is_opened);
extern "C" pAVInputFormat __cdecl av_probe_input_format2(pAVProbeData pd, int is_opened, int &score_max);
extern "C" pAVInputFormat __cdecl av_probe_input_format3(pAVProbeData pd, int is_opened, int &score_ret);
extern "C" int __cdecl av_probe_input_buffer2(pAVIOContext pb, pAVInputFormat &fmt, const char * url, void * logctx, unsigned offset, unsigned max_probe_size);
extern "C" int __cdecl av_probe_input_buffer(pAVIOContext pb, pAVInputFormat &fmt, const char * url, void * logctx, unsigned offset, unsigned max_probe_size);
extern "C" int __cdecl avformat_open_input(pAVFormatContext &ps, const char * url, pAVInputFormat fmt, Libavutil::ppAVDictionary options)/* overload */;
extern "C" int __cdecl avformat_open_input(pAVFormatContext &ps, const char * url, pAVInputFormat fmt, Libavutil::pAVDictionary &options)/* overload */;
extern "C" int __cdecl av_demuxer_open(pAVFormatContext ic);
extern "C" int __cdecl avformat_find_stream_info(pAVFormatContext ic, Libavutil::ppAVDictionary options)/* overload */;
extern "C" int __cdecl avformat_find_stream_info(pAVFormatContext ic, Libavutil::pAVDictionary &options)/* overload */;
extern "C" pAVProgram __cdecl av_find_program_from_stream(pAVFormatContext ic, pAVProgram last, int s);
extern "C" void __cdecl av_program_add_stream_index(pAVFormatContext ac, int progid, unsigned idx);
extern "C" int __cdecl av_find_best_stream(pAVFormatContext ic, Libavutil::AVMediaType _type, int wanted_stream_nb, int related_stream, Libavcodec::pAVCodec &decoder_ret, int flags);
extern "C" int __cdecl av_read_frame(pAVFormatContext s, Libavcodec::pAVPacket pkt)/* overload */;
extern "C" int __cdecl av_read_frame(pAVFormatContext s, Libavcodec::AVPacket &pkt)/* overload */;
extern "C" int __cdecl av_seek_frame(pAVFormatContext s, int stream_index, __int64 timestamp, int flags);
extern "C" int __cdecl avformat_seek_file(pAVFormatContext s, int stream_index, __int64 min_ts, __int64 ts, __int64 max_ts, int flags);
extern "C" int __cdecl avformat_flush(pAVFormatContext s);
extern "C" int __cdecl av_read_play(pAVFormatContext s);
extern "C" int __cdecl av_read_pause(pAVFormatContext s);
extern "C" void __cdecl avformat_close_input(pAVFormatContext &s);
static const System::Int8 AVSEEK_FLAG_BACKWARD = System::Int8(0x1);
static const System::Int8 AVSEEK_FLAG_BYTE = System::Int8(0x2);
static const System::Int8 AVSEEK_FLAG_ANY = System::Int8(0x4);
static const System::Int8 AVSEEK_FLAG_FRAME = System::Int8(0x8);
static const System::Int8 AVSTREAM_INIT_IN_WRITE_HEADER = System::Int8(0x0);
static const System::Int8 AVSTREAM_INIT_IN_INIT_OUTPUT = System::Int8(0x1);
extern "C" int __cdecl avformat_write_header(pAVFormatContext s, Libavutil::ppAVDictionary options);
extern "C" int __cdecl avformat_init_output(pAVFormatContext s, Libavutil::pAVDictionary &options);
extern "C" int __cdecl av_write_frame(pAVFormatContext s, Libavcodec::pAVPacket pkt);
extern "C" int __cdecl av_interleaved_write_frame(pAVFormatContext s, Libavcodec::pAVPacket pkt);
extern "C" int __cdecl av_write_uncoded_frame(pAVFormatContext s, int stream_index, Libavutil::pAVFrame frame);
extern "C" int __cdecl av_interleaved_write_uncoded_frame(pAVFormatContext s, int stream_index, Libavutil::pAVFrame frame);
extern "C" int __cdecl av_write_uncoded_frame_query(pAVFormatContext s, int stream_index);
extern "C" int __cdecl av_write_trailer(pAVFormatContext s);
extern "C" pAVOutputFormat __cdecl av_guess_format(const char * short_name, const char * filename, const char * mime_type);
extern "C" Libavcodec::AVCodecID __cdecl av_guess_codec(pAVOutputFormat fmt, const char * short_name, const char * filename, const char * mime_type, Libavutil::AVMediaType _type);
extern "C" int __cdecl av_get_output_timestamp(pAVFormatContext s, int stream, __int64 &dts, __int64 &wall);
extern "C" void __cdecl av_hex_dump(Ffmpeg_types::PFile f, const System::PByte buf, int size);
extern "C" void __cdecl av_hex_dump_log(void * avcl, int level, const System::PByte buf, int size);
extern "C" void __cdecl av_pkt_dump2(Ffmpeg_types::PFile f, const Libavcodec::pAVPacket pkt, int dump_payload, const pAVStream st);
extern "C" void __cdecl av_pkt_dump_log2(void * avcl, int level, const Libavcodec::pAVPacket pkt, int dump_payload, const pAVStream st);
extern "C" Libavcodec::AVCodecID __cdecl av_codec_get_id(const ppAVCodecTag tags, unsigned tag);
extern "C" unsigned __cdecl av_codec_get_tag(const ppAVCodecTag tags, Libavcodec::AVCodecID id);
extern "C" int __cdecl av_codec_get_tag2(const ppAVCodecTag tags, Libavcodec::AVCodecID id, Ffmpeg_types::punsigned_int tag);
extern "C" int __cdecl av_find_default_stream_index(pAVFormatContext s);
extern "C" int __cdecl av_index_search_timestamp(pAVStream st, __int64 timestamp, int flags);
extern "C" int __cdecl av_add_index_entry(pAVStream st, __int64 pos, __int64 timestamp, int size, int distance, int flags);
extern "C" void __cdecl av_url_split(char * proto, int proto_size, char * authorization, int authorization_size, char * hostname, int hostname_size, int &port_ptr, char * path, int path_size, const char * url);
extern "C" void __cdecl av_dump_format(pAVFormatContext ic, int index, const char * url, int is_output);
static const System::Int8 AV_FRAME_FILENAME_FLAGS_MULTIPLE = System::Int8(0x1);
extern "C" int __cdecl av_get_frame_filename2(char * buf, int buf_size, const char * path, int number, int flags);
extern "C" int __cdecl av_get_frame_filename(char * buf, int buf_size, const char * path, int number);
extern "C" int __cdecl av_filename_number_test(const char * filename);
extern "C" int __cdecl av_sdp_create(ppAVFormatContext ac, int n_files, char * buf, int size);
extern "C" int __cdecl av_match_ext(const char * filename, const char * extensions);
extern "C" int __cdecl avformat_query_codec(const pAVOutputFormat ofmt, Libavcodec::AVCodecID codec_id, int std_compliance);
extern "C" pAVCodecTag __cdecl avformat_get_riff_video_tags(void);
extern "C" pAVCodecTag __cdecl avformat_get_riff_audio_tags(void);
extern "C" pAVCodecTag __cdecl avformat_get_mov_video_tags(void);
extern "C" pAVCodecTag __cdecl avformat_get_mov_audio_tags(void);
extern "C" Libavutil::AVRational __cdecl av_guess_sample_aspect_ratio(pAVFormatContext format, pAVStream stream, Libavutil::pAVFrame frame);
extern "C" Libavutil::AVRational __cdecl av_guess_frame_rate(pAVFormatContext ctx, pAVStream stream, Libavutil::pAVFrame frame);
extern "C" int __cdecl avformat_match_stream_specifier(pAVFormatContext s, pAVStream st, const char * spec);
extern "C" int __cdecl avformat_queue_attached_pictures(pAVFormatContext s);
extern "C" int __cdecl av_apply_bitstream_filters(Libavcodec::pAVCodecContext codec, Libavcodec::pAVPacket pkt, Libavcodec::pAVBitStreamFilterContext bsfc);
extern "C" int __cdecl avformat_transfer_internal_stream_timing_info(const pAVOutputFormat ofmt, pAVStream ost, const pAVStream ist, AVTimebaseSource copy_tb);
extern "C" Libavutil::AVRational __cdecl av_stream_get_codec_timebase(const AVStream &st);
extern DELPHI_PACKAGE __int64 __fastcall avio_tell(pAVIOContext s);
}	/* namespace Libavformat */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_LIBAVFORMAT)
using namespace Libavformat;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// LibavformatHPP
